package com.gitee.wsl.ext.collection


fun <A, B : Any> Sequence<Pair<A, B?>>.filterPairSecondNotNull(): Sequence<Pair<A, B>> {
    return mapNotNull { pair ->
        if (pair.second == null) {
            null
        } else {
            @Suppress("UNCHECKED_CAST")
            pair as Pair<A, B>
        }
    }
}